const path = require('path');

module.exports = {
  mode: 'development',
  entry: path.resolve(__dirname, 'src/renderer/index.tsx'),
  target: 'web',
  devtool: 'source-map',
  output: {
    filename: 'renderer.js',
    path: path.resolve(__dirname, 'public'),
    publicPath: './'
  },
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: [
          {
            loader: 'ts-loader',
            options: {
              configFile: path.resolve(__dirname, 'tsconfig.renderer.json')
            }
          }
        ],
        exclude: /node_modules/,
      },
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader'],
      },
    ],
  },
  resolve: {
    extensions: ['.tsx', '.ts', '.js', '.css'],
    modules: [path.resolve(__dirname, 'node_modules')]
  },
}; 